package com.blog.dxxr.blogfront.Service.Impl;

import com.blog.dxxr.blogfront.Domain.ThankComment;
import com.blog.dxxr.blogfront.Mapper.ArticleCommentMapper;
import com.blog.dxxr.blogfront.Mapper.ThankCommentMapper;
import com.blog.dxxr.blogfront.Mapper.WebBrowseMapper;
import com.blog.dxxr.blogfront.Service.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WebServiceImpl implements WebService {
    @Autowired
    private WebBrowseMapper webBrowseMapper;
    @Autowired
    private ArticleCommentMapper articleCommentMapper;
    @Autowired
    private ThankCommentMapper thankCommentMapper;

    @Override
    public void updateWebBrowseTotal() {
        webBrowseMapper.updateWebBrowseTotal();
    }

    @Override
    public int selectWebBrowseTotal() {
        return webBrowseMapper.selectWebBrowseTotal();
    }

    @Override
    public int queryCommentTotal() {
        return articleCommentMapper.selectCommentTotal();
    }

    @Override
    public List<ThankComment> queryThankComment() {
        return thankCommentMapper.selectThankComment();
    }

    @Override
    public int saveThankComment(ThankComment thankComment) {
        return thankCommentMapper.saveThankComment(thankComment);
    }
}
